package vistas.clientes;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JSeparator;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class AdminClientes extends javax.swing.JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JMenuBar jMenuBar1;
	private JSeparator jSeparator4;
	private JSeparator jSeparator3;
	private JMenuItem jMenuItem2;
	private JMenuItem jMenuItem1;
	private JMenu jMenu2;
	private JSeparator jSeparator2;
	private JMenuItem jMenuItemModificar;
	private JSeparator jSeparator1;
	private JMenuItem jMenuItemBaja;
	private JMenuItem jMenuItemAlta;
	private JMenu jMenu1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				AdminClientes inst = new AdminClientes();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public AdminClientes() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(jMenuBar1);
				{
					jMenu1 = new JMenu();
					jMenuBar1.add(jMenu1);
					jMenu1.setText("MENU");
					{
						jMenuItemAlta = new JMenuItem();
						jMenu1.add(jMenuItemAlta);
						jMenuItemAlta.setText("ALTA");
						jMenuItemAlta.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItemAlta.actionPerformed, event="+evt);
								AltaFrame v1 = new AltaFrame();
								v1.setVisible(true);
								v1.setLocationRelativeTo(null);
							}
						});
					}
					{
						jMenuItemBaja = new JMenuItem();
						jMenu1.add(jMenuItemBaja);
						jMenuItemBaja.setText("BAJA");
						jMenuItemBaja.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItemBaja.actionPerformed, event="+evt);
								
								BajaFrame v= new BajaFrame();
								v.setLocationRelativeTo(null);
								v.setVisible(true);
							}
						});
						{
							jSeparator1 = new JSeparator();
							jMenuItemBaja.add(jSeparator1);
						}
					}
					{
						jMenuItemModificar = new JMenuItem();
						jMenu1.add(jMenuItemModificar);
						jMenuItemModificar.setText("MODIFICAR");
						jMenuItemModificar.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent evt) {
								System.out.println("jMenuItemModificar.actionPerformed, event="+evt);
								
								ModificarClienteFrame v=new ModificarClienteFrame();
								v.setVisible(true);
								v.setLocationRelativeTo(null);
								
							}
						});
						{
							jSeparator2 = new JSeparator();
							jMenuItemModificar.add(jSeparator2);
						}
						{
							jSeparator4 = new JSeparator();
							jMenuItemModificar.add(jSeparator4);
						}
					}
					{
						jMenu2 = new JMenu();
						jMenu1.add(jMenu2);
						jMenu2.setText("LISTAR");
						{
							jMenuItem1 = new JMenuItem();
							jMenu2.add(jMenuItem1);
							jMenuItem1.setText("TODOS LOS CLIENTES");
						}
						{
							jMenuItem2 = new JMenuItem();
							jMenu2.add(jMenuItem2);
							jMenuItem2.setText("UN CLIENTE");
							jMenuItem2.addActionListener(new ActionListener() {
								public void actionPerformed(ActionEvent evt) {
									System.out.println("jMenuItem2.actionPerformed, event="+evt);
									
									ListaUnCliente v = new ListaUnCliente();
									v.setVisible(true);
									v.setLocationRelativeTo(null);
								}
							});
							{
								jSeparator3 = new JSeparator();
								jMenuItem2.add(jSeparator3);
							}
						}
					}
				}
			}
			pack();
			this.setSize(509, 407);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	/**
	* Auto-generated method for setting the popup menu for a component
	*/
	private void setComponentPopupMenu(final java.awt.Component parent, final javax.swing.JPopupMenu menu) {
		parent.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mousePressed(java.awt.event.MouseEvent e) {
				if(e.isPopupTrigger())
					menu.show(parent, e.getX(), e.getY());
			}
			public void mouseReleased(java.awt.event.MouseEvent e) {
				if(e.isPopupTrigger())
					menu.show(parent, e.getX(), e.getY());
			}
		});
	}

}
